<?php

namespace app\common\library;

use EasyWeChat\Factory;

class Pay
{
    private static $config = [
//        'app_id' => '',
        'mch_id' => '1639834119',
        'key' => 'gu4HatMxNmhktagn4aGQy8zcLkgjFmnV',
        'notify_url' => 'https://vxtool.dingliangames.com/api/recharge/mini_pay_notify',//支付回调地址
        // 如需使用敏感接口（如退款、发送红包等）需要配置 API 证书路径(登录商户平台下载 API 证书)
        'cert_path' => ROOT_PATH . 'public/certificate/apiclient_cert.pem', // XXX: 绝对路径！！！！
        'key_path' => ROOT_PATH . 'public/certificate/apiclient_key.pem',      // XXX: 绝对路径！！！！
    ];

    public static function app()
    {
        return Factory::payment(array_merge(['app_id' => "wx4682ba92168146ba"], self::$config));
    }
}